//
//  XLHTTPRequest.h
//  xinLing
//
//  Created by 于鹏 on 2017/5/17.
//  Copyright © 2017年 于鹏. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>

//UIKIT_EXTERN NSString *const XLBaseURL;

/**
 缓存的block

 @param responseCache 缓存数据
 */
typedef void(^XLRequestCache)(id responseCache);
     
/**
 请求成功的block

 @param responseObject 响应体数据
 */
typedef void(^XLRequestSuccess)(id responseObject);

/**
 请求失败的block

 @param error 错误信息
 @param info 返回提示信息
 */
typedef void(^XLRequestFailure)(NSError *error, NSString *info);

/**
 上传进度的block
 
 @param progress 上传进度
 */
typedef void (^XLRequestProgress)(NSProgress *progress);

@interface XLHTTPRequest : NSObject

#pragma mark - 用户管理(UserMgr)
/** 登录*/
+ (NSURLSessionTask *)UM_loginWithParameters:(id)parameters success:(XLRequestSuccess)success failure:(XLRequestFailure)failure;
/** 登出*/
+ (NSURLSessionTask *)UM_loginOutWithParameters:(id)parameters success:(XLRequestSuccess)success failure:(XLRequestFailure)failure;
/** 得到短信验证码*/
+ (NSURLSessionTask *)UM_getSMSWithParameters:(id)parameters success:(XLRequestSuccess)success failure:(XLRequestFailure)failure;
/** 检测短信验证码*/
+ (NSURLSessionTask *)UM_checkSMSWithParameters:(id)parameters success:(XLRequestSuccess)success failure:(XLRequestFailure)failure;
/** 重置密码*/
+ (NSURLSessionTask *)UM_resetPwdWithParameters:(id)parameters success:(XLRequestSuccess)success failure:(XLRequestFailure)failure;
/** 修改手机号码*/
+ (NSURLSessionTask *)UM_changePhoneNumberWithParameters:(id)parameters success:(XLRequestSuccess)success failure:(XLRequestFailure)failure;
/** 获取用户信息*/
+ (NSURLSessionTask *)UM_getUserInfoWithParameters:(id)parameters success:(XLRequestSuccess)success failure:(XLRequestFailure)failure;
/** 修改用户名*/
+ (NSURLSessionTask *)UM_changeUserNameWithParameters:(id)parameters success:(XLRequestSuccess)success failure:(XLRequestFailure)failure;
/** 修改所属医院*/
+ (NSURLSessionTask *)UM_changeHospitalNameWithParameters:(id)parameters success:(XLRequestSuccess)success failure:(XLRequestFailure)failure;
/** 修改性别*/
+ (NSURLSessionTask *)UM_changeGenderWithParameters:(id)parameters success:(XLRequestSuccess)success failure:(XLRequestFailure)failure;
/** 上传头像*/
+ (NSURLSessionTask *)UM_uploadUserLogoWithUserID:(NSString *)userID token:(NSString *)token image:(UIImage *)image progress:(XLRequestProgress)progress success:(XLRequestSuccess)success failure:(XLRequestFailure)failure;
/** 上传个人简介*/
+ (NSURLSessionTask *)UM_UploadProfileWithParameters:(id)parameters success:(XLRequestSuccess)success failure:(XLRequestFailure)failure;



#pragma mark - 急救管理(EmergencyTreamentMgr)

/** 获取医生正在参与的急诊列表*/
+ (NSURLSessionTask *)ETM_getCurrentListWithParameters:(id)parameters responseCache:(XLRequestCache)responseCache success:(XLRequestSuccess)success failure:(XLRequestFailure)failure;
/** 将急诊置顶*/
+ (NSURLSessionTask *)ETM_setETToTopWithParameters:(id)parameters success:(XLRequestSuccess)success failure:(XLRequestFailure)failure;
/** 取消急诊置顶*/
+ (NSURLSessionTask *)ETM_cancelETToTopWithParameters:(id)parameters success:(XLRequestSuccess)success failure:(XLRequestFailure)failure;
/** 结束会诊*/
+ (NSURLSessionTask *)ETM_overETWithParameters:(id)parameters success:(XLRequestSuccess)success failure:(XLRequestFailure)failure;
/** 获取电子病历*/
+ (NSURLSessionTask *)ETM_getPatientRecordWithParameters:(id)parameters responseCache:(XLRequestCache)responseCache success:(XLRequestSuccess)success failure:(XLRequestFailure)failure;
/** 获取病人基本信息*/
+ (NSURLSessionTask *)ETM_getPatientInfoWithParameters:(id)parameters responseCache:(XLRequestCache)responseCache success:(XLRequestSuccess)success failure:(XLRequestFailure)failure;
/** 获取病史信息*/
+ (NSURLSessionTask *)ETM_getPatientHistoryWithParameters:(id)parameters responseCache:(XLRequestCache)responseCache success:(XLRequestSuccess)success failure:(XLRequestFailure)failure;
/** 获取辅助检查信息*/
+ (NSURLSessionTask *)ETM_getCheckWithParameters:(id)parameters responseCache:(XLRequestCache)responseCache success:(XLRequestSuccess)success failure:(XLRequestFailure)failure;
/** 获取病情变化信息*/
+ (NSURLSessionTask *)ETM_getChangeWithParameters:(id)parameters responseCache:(XLRequestCache)responseCache success:(XLRequestSuccess)success failure:(XLRequestFailure)failure;
/** 获取急诊实时数据*/
+ (NSURLSessionTask *)ETM_getRealTimeDataWithParameters:(id)parameters success:(XLRequestSuccess)success failure:(XLRequestFailure)failure;
/** 获取医生的历史急诊列表*/
+ (NSURLSessionTask *)ETM_getHistoryListWithParameters:(id)parameters responseCache:(XLRequestCache)responseCache success:(XLRequestSuccess)success failure:(XLRequestFailure)failure;

#pragma mark - 医生管理(doctor)
/** 医生退出会诊*/
+ (NSURLSessionTask *)Doctor_quitETWithParameters:(id)parameters success:(XLRequestSuccess)success failure:(XLRequestFailure)failure;
/** 获取会诊中的医生列表*/
+ (NSURLSessionTask *)Doctor_getDoctorInETWithParameters:(id)parameters responseCache:(XLRequestCache)responseCache success:(XLRequestSuccess)success failure:(XLRequestFailure)failure;
/** 获取可加入到会诊中的医生列表*/
+ (NSURLSessionTask *)Doctor_getDoctorsCanJoinWithParameters:(id)parameters responseCache:(XLRequestCache)responseCache success:(XLRequestSuccess)success failure:(XLRequestFailure)failure;
/** 添加医生到会诊*/
+ (NSURLSessionTask *)Doctor_addDoctorToETWithParameters:(id)parameters success:(XLRequestSuccess)success failure:(XLRequestFailure)failure;
/** 获取融云Token*/
+ (NSURLSessionTask *)Doctor_getRYTokenWithParameters:(id)parameters success:(XLRequestSuccess)success failure:(XLRequestFailure)failure;
/** 查询医生信息(通过容云ID)*/
+ (NSURLSessionTask *)Doctor_searchDoctorByRYIDWithParameters:(id)parameters success:(XLRequestSuccess)success failure:(XLRequestFailure)failure;

#pragma mark - 许可协议管理(AgreementInfo)
/** 获取许可信息*/
+ (NSURLSessionTask *)getAgreementInfoWithParameters:(id)parameters success:(XLRequestSuccess)success failure:(XLRequestFailure)failure;

#pragma mark - 上传管理(UploadTemplate)
/** 上传检查服务信息*/
+ (NSURLSessionTask *)Upload_checkInfoWithParameters:(id)parameters success:(XLRequestSuccess)success failure:(XLRequestFailure)failure;
/**上传用药信息*/
+ (NSURLSessionTask *)Upload_medicineWithParameters:(id)parameters success:(XLRequestSuccess)success failure:(XLRequestFailure)failure;

@end
